package ikar.nrd.model;

import java.util.HashMap;
import java.util.Map;

public class XmlNamespaceManager {

	private final String uri;
	private final String link;

	private static Map<String, XmlNamespaceManager> namespaces = new HashMap<String, XmlNamespaceManager>();

	public XmlNamespaceManager(String uri, String link) {
		super();
		this.uri = uri;
		this.link = link;
	}

	public static void add(String uri, String link) {
		namespaces.put(uri, new XmlNamespaceManager(uri, link));
	}

	public static String getLinkByUri(String uri) {
		if (namespaces.containsKey(uri)) {
			return namespaces.get(uri).getLink();
		}
		return "";
	}

	public String getUri() {
		return uri;
	}

	public String getLink() {
		return link;
	}
	

}
